home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 007a / cug315.zip / DOS_FUNC.H < prev    next >
C/C++ Source or Header  |  1990-05-16  |  1KB  |  59 lines

  1.  
  2. /* typedefs and function declarations for DOS calls.  Created by */
  3. /* T Clune for ERI.  Copyright (c) 1988 Eye Research Institute, */
  4. /* 20 Staniford St., Boston, MA 02114.  All Rights Reserved. */
  5.  
  6. #ifndef DOS_FUNC_H
  7. #define DOS_FUNC_H
  8.  
  9.  
  10. typedef union    /* union to turn addresses into seg:offset */
  11. {         /* uses unsigned long int for "generic" ptr, as types will vary */
  12.     struct
  13.     {
  14.     unsigned int offset;
  15.     unsigned int segment;
  16.     } s;
  17.     unsigned long pointer;
  18. }address_union;
  19.  
  20.  
  21.  
  22. typedef struct  /* the disk transfer area struct for funcs 0x4E and 0x4F */
  23. {       /* of int 0x21.  See PPS, p. 256 */
  24.     unsigned char reserved[21];  /* used by DOS */
  25.     unsigned char attrib; /* file attribute (see prog. prob. solver, p.263) */
  26.     unsigned int time; /* time of file creation (PPS, p. 262) */
  27.     unsigned int date; /* date of file creation (PPS, p.262) */
  28.     unsigned long int size; /* number of bytes in file */
  29.     unsigned char name[14]; /* name of file */
  30. } dta;
  31.  
  32.  
  33.     /* union to change dta time/date into string in fget_time_date() */
  34. typedef union
  35. {
  36.     struct
  37.     {
  38.     unsigned int time;
  39.     unsigned int date;
  40.     }w;
  41.     struct
  42.     {
  43.     unsigned secs: 5;
  44.     unsigned mins: 6;
  45.     unsigned hrs: 5;
  46.     unsigned day: 5;
  47.     unsigned mon: 4;
  48.     unsigned yr: 7;
  49.     }b;
  50. }filestamp;
  51.  
  52.  
  53. long disk_space();
  54. int del_fhandle(), fname_unused(), get_dir(), count_files();
  55.  
  56.  
  57. #endif
  58.  
  59.